package com.juyu.miliao.api.domain;

import java.time.LocalDateTime;

import javax.validation.constraints.Min;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonView;
import com.juyu.miliao.api.util.JacksonView;
import com.juyu.miliao.api.validator.GiveSpendCheck;

/**
 * 账单明细表
 * @author wbf
 */
public class BillDetail {
	/** id */
	@JsonIgnore
	private int id;
	/** 消费类型：1.购买私照 2 语音聊天 3 视频聊天 4 送礼物 5送红包
	 * 6幸运红包 7金币充值 8购买聊天闪图 9幸运转盘消费金币 10幸运轮盘赚取金币 11 购买qq 12 购买微信*/
	@JsonView(JacksonView.BillDetail.class) 
	private int recordType;
	/** 赚取钻石用户id */
	@Min(value = 1, groups = {GiveSpendCheck.class})
	private long inUserId;
	/** 消费金币用户id */
	@Min(value = 1, groups = {GiveSpendCheck.class})
	private long outUserId;
	/** 赚取钻石数(单位：个) */
	private double diamond;
	@Min(value = 1, groups = {GiveSpendCheck.class})
	/** 费用（单位：金币/个） */
	private int spend;
	/** 创建时间 */
	@JsonView(JacksonView.RedPacket.class) 
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private LocalDateTime createTime;
	/**1:赚取钻石，2：花费金币，3：赚取金币*/
	@JsonView(JacksonView.RedPacket.class)
	private int type;
	//消费类型描述
	@JsonView(JacksonView.BillDetail.class)
	private String message;
	/** 账单*/
	@JsonView(JacksonView.RedPacket.class) 
	private double bill;

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public double getBill() {
		return bill;
	}

	public void setBill(double bill) {
		this.bill = bill;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getRecordType() {
		return recordType;
	}

	public void setRecordType(int recordType) {
		this.recordType = recordType;
	}

	public long getInUserId() {
		return inUserId;
	}

	public void setInUserId(long inUserId) {
		this.inUserId = inUserId;
	}

	public long getOutUserId() {
		return outUserId;
	}

	public void setOutUserId(long outUserId) {
		this.outUserId = outUserId;
	}

	public double getDiamond() {
		return diamond;
	}

	public void setDiamond(double diamond) {
		this.diamond = diamond;
	}

	public int getSpend() {
		return spend;
	}

	public void setSpend(int spend) {
		this.spend = spend;
	}

	public LocalDateTime getCreateTime() {
		return createTime;
	}

	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}

}
